package com.atguigu.canalclientedu;

import com.atguigu.canalclientedu.client.CanalClient;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import javax.annotation.Resource;

@SpringBootApplication
public class CanalClienteduApplication implements CommandLineRunner {

	@Resource
	private CanalClient canalClient;

	public static void main(String[] args) {
		SpringApplication.run(CanalClienteduApplication.class, args);
	}

	@Override
	public void run(String... args) throws Exception {
		//项目启动，执行canal客户端监听
		canalClient.run();
	}
}
